<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="superviseMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="0" />
<title>建设单位注册</title>
<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script type="text/javascript">
	$(document).ready(function() {
		$("#finishDate").addClass("Wate").bind("focus", function(){
			 WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'});});
		
		$("#userName").focus();
		$("#inputForm").validate({
			rules:{
				userName:{
					required : true,
					remote : "account/user!checkLoginName.action?oldLoginName="
							+ encodeURIComponent('${userName}')
				},
				password : {
					required : true,
					minlength : 3
				},
				passwordConfirm : {
					equalTo : "#password"
				},
				email : "email",
				orgName:{
					required : true,
					remote	: "app/organization!checkOrgName.action?oldOrgName="
							+ encodeURIComponent('${orgName}')
				},
				orgNum:{
					required : true,
					remote : "app/organization!checkOrgNum.action?oldOrgNum="
							+ encodeURIComponent('${orgNum}')
				}
			},
			messages:{
				userName : {
					remote : "<font color='red'>用户登录名已存在</font>"
				},
				passwordConfirm : {
					equalTo : "<font color='red'>输入与上面相同的密码</font>"
				},
				orgName	: {
					remote : "<font color='red'>单位名已存在</font>"
				},
				orgNum	: {
					remote : "<font color='red'>机构代码已存在</font>"
				}
			}
		});
	});
</script>
</head>
<body>
	<h1>建设单位注册</h1>
	<form action="app/organization!login.action" method="post" id="inputForm"
		class="yform">
		<input type="hidden" name="id" value="${id }"> 
		<input type="hidden" name="orgForm" value="1">
		<div>
			<table class="noborder">
				<tr class="type-text">
					<td>用户名</td>
					<td><input type="text" name="userName" id="userName"
						value="${userName }">
					</td>
				</tr>
				<tr class="type-text">
					<td>真实姓名</td>
					<td><input type="text" name="name" id="name" value="${name }">
					</td>
				</tr>
				<tr class="type-text">
					<td>密码</td>
					<td><input type="password" name="password" id="password"
						value="${password }">
					</td>
				</tr>
				<tr class="type-text">
					<td>确认密码</td>
					<td><input type="password" id="passwordConfirm"
						name="passwordConfirm" value="${password}" /></td>
				</tr>
				<tr class="type-text">
					<td>邮箱</td>
					<td><input type="text" name="userEmail" id="userEmail">
					</td>
				</tr>
			</table>
		</div>
		<div>
			<table class="noborder">
				<tr class="type-text">
					<td>单位名称</td>
					<td><input type="text" name="orgName" id="orgName" value="${orgName }">
					</td>
				</tr>
				<tr class="type-text">
					<td>主管部门</td>
					<td><input type="text" name="burderDep" id="burderDep" value="${burderDep }">
					</td>
				</tr>
				<tr class="type-text">
					<td>级别</td>
					<td><input type="text" name="orgLevel" id="orgLevel" value="${orgLevel }">
					</td>
				</tr>
				<tr class="type-text">
					<td>行政级别</td>
					<td><input type="text" id="politicsLevel" name="politicsLevel"
						value="${politicsLevel }"></td>
				</tr>
				<tr class="type-text">
					<td>成立时间</td>
					<td><input type="text" name="finishDate" id="finishDate"
						value="<fmt:formatDate value='${finishDate}' pattern="yyyy-MM-dd" />"></td>
				</tr>
				<tr class="type-text">
					<td>单位电话</td>
					<td><input type="text" id="orgTelephone" name="orgTelephone"
						value="${orgTelephone }"></td>
				</tr>
				<tr class="type-text">
					<td>传真</td>
					<td><input type="text" id="portraiture" name="portraiture"
						value="${portraiture }"></td>
				</tr>
				<tr class="type-text">
					<td>机构代码</td>
					<td><input type="text" id="orgNum" name="orgNum" value="${orgNum }">
					</td>
				</tr>
				<tr class="type-text">
					<td>邮政编码</td>
					<td><input type="text" id="postCode" name="postCode" value="${postCode }">
					</td>
				</tr>
				<tr class="type-text">
					<td>电子邮箱</td>
					<td><input type="text" id="email" name="email" value="${email }">
					</td>
				</tr>
				<tr class="type-text">
					<td>单位主页</td>
					<td><input type="text" id="orgHome" name="orgHome" value="${orgHome }">
					</td>
				</tr>
				<tr class="type-text">
					<td>经费来源</td>
					<td><input type="text" id="moneySource" name="moneySource"
						value="${moneySource }"></td>
				</tr>
				<tr class="type-text">
					<td>单位地址</td>
					<td><input type="text" id="orgAddress" name="orgAddress"
						value="${orgAddress }"></td>
				</tr>
				<tr class="type-text">
					<td>单位职能</td>
					<td><textarea name="functionsOrg" id="functionsOrg">${functionsOrg }</textarea>
					</td>
				</tr>
				<tr class="type-text">
					<td>基本简况</td>
					<td><textarea name="basicInfo" id="basicInfo">${basicInfo }</textarea></td>
				</tr>
				<tr class="type-text">
					<td>备注</td>
					<td><textarea name="remark" id="remark">${remark }</textarea>
					</td>
				</tr>
			</table>
		</div>
		<div class="type-button">
			<input type="submit" class="submit" value="提交" />&nbsp;
			<input type="button" value="返回"  
				onclick="history.back()" />
		</div>
	</form>
</body>
</html>